const mongoose = require("mongoose");
const dayjs = require("dayjs");

const categorySchema = new mongoose.Schema({
  name: {
    type: String,
    require: true,
    index: true
  },
  id: {
    type: String,
    require: true,
    index: true
  },
  icon: String,
  createTime: {
    type: Date,
    default: new Date()
  },
  type: Number,
  sort: Number,
  status: {
    type: Number,
    default: 1
  }
})

module.exports = mongoose.model("category", categorySchema, 'category')
